import java.util.Scanner;
import java.util.Vector;

public class Main4 {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        Vector<Integer> w = new Vector<>();
        int t = n;
        while (t!=0){
            t--;
            w.add(s.nextInt());
        }
        for (int i = 0; i < n; i++) {
            int buildingCanBeSeen = 0;
            int frontLowestBuildingHeight = 0, backLowestBuildingHeight = 0;
            for (int j = i - 1; j >= 0; j--) {//front
                if (w.get(j) > frontLowestBuildingHeight) {
                    buildingCanBeSeen++;
                    frontLowestBuildingHeight = w.get(j);
                }
            }
            buildingCanBeSeen++;
            for (int j = i + 1; j < n; j++) {
                if (w.get(j) > backLowestBuildingHeight) {
                    buildingCanBeSeen++;
                    backLowestBuildingHeight = w.get(j);
                }
            }
            System.out.print(buildingCanBeSeen + " ");
        }

    }
}
